FROM alpine:latest

MAINTAINER single_yang

ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
ENV LD_LIBRARY_PATH /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server

RUN echo "http://mirrors.aliyun.com/alpine/v3.11/main/" > /etc/apk/repositories && \
    echo "http://mirrors.aliyun.com/alpine/v3.11/community/" >> /etc/apk/repositories

RUN apk update && \
    apk add openjdk8 tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone && \
    rm -rf /tmp/* /var/cache/apk/*
